package com.grouponmall.dao;

import java.io.IOException;
import java.io.Reader;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

public class SQLMapperClient {
	public static SqlMapClient data = null;
	static {
		try {
			Reader reader = Resources.getResourceAsReader("sql-map-config.xml");
			data = SqlMapClientBuilder.buildSqlMapClient(reader);
			reader.close();
		} catch (IOException e) {
			// Fail fast
			throw new RuntimeException(
					"Cannot load and build SqlMapClient instances.", e);
		}
	}
}
